<template>
    <div class="message-container">
      <!-- 时间戳 -->
      <div class="timestamp">2025/04/02 08:48</div>
  
      <!-- QQ阅读消息 -->
      <div class="message-card">
        <div class="message-header">
          <span class="app-name">Vue前端框架实战</span>
        </div>
        <div class="message-content">
          <h3 class="message-title">作业到期提醒</h3>
          <p class="message-desc">第一次作业即将在24小时内过期，请尽快前往完成！</p>
        </div>
        <div class="message-footer">
          <span class="more-text">查看详情</span>
          <i class="arrow-icon">></i>
        </div>
      </div>
  
      <!-- 时间戳 -->
      <div class="timestamp">星期四 15:44</div>
  
      <!-- 人保财险消息1 -->
      <div class="message-card">
        <div class="message-header">
          <span class="app-name">Unity游戏开发入门</span>
        </div>
        <div class="message-content">
          <h3 class="message-title">作业到期提醒</h3>
          <p class="message-desc">第五次次作业即将在24小时内过期，请尽快前往完成！</p>
        </div>
        <div class="message-footer">
          <!-- <div class="attachment">
            <i class="attachment-icon">📎</i>
            <span>1个附件</span>
          </div> -->
          <span class="more-text">查看详情</span>
          <i class="arrow-icon">></i>
        </div>
      </div>
  
      <!-- 人保财险消息2 -->
      <div class="message-card">
        <div class="message-header">
          <span class="app-name">数据库管理：MySQL实战</span>
        </div>
        <div class="message-content">
          <h3 class="message-title">作业到期提醒</h3>
          <p class="message-desc">第十一次作业即将在24小时内过期，请尽快前往完成！</p>
        </div>
        <div class="message-footer">
          <!-- <div class="attachment">
            <i class="attachment-icon">📎</i>
            <span>1个附件</span>
          </div> -->
          <span class="more-text">查看详情</span>
          <i class="arrow-icon">></i>
        </div>
      </div>
    </div>
  </template>
  
  <script setup>
  import { ref } from 'vue'
  
  const messages = ref([
    {
      id: 1,
      timestamp: '2025/04/02 08:48',
      appName: 'QQ阅读',
      title: '会员续费成功提醒',
      description: '会员续费成功提醒(2025-04-02 08:48:01)您的QQ账户1215065 已成功续费QQ阅读会员服务 有效期至：2...',
      hasAttachment: false
    },
    {
      id: 2,
      timestamp: '星期四 15:44',
      appName: '人保财险电子保单平台',
      title: '中国人民财产保险股份有限公司电子保单',
      description: '[进入首页]      尊敬的客户：感谢您选择中国人保财险！您已成功投保"如意行"综合综合保险，保单号PE...',
      hasAttachment: true,
      attachmentCount: 1
    },
    {
      id: 3,
      timestamp: '星期四 15:44',
      appName: '人保财险电子保单平台',
      title: '中国人民财产保险股份有限公司电子保单',
      description: '[进入首页]      尊敬的客户：感谢您选择中国人保财险！您已成功为云AS2776投保车辆保险，服箱附件...',
      hasAttachment: true,
      attachmentCount: 1
    }
  ])
  </script>
  
  <style scoped>
  .message-container {
    max-width: 600px;
    min-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  
  .timestamp {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 16px 0;
  }
  
  .message-card {
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 16px;
  }
  
  .message-header {
    margin-bottom: 12px;
  }
  
  .app-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }
  
  .message-content {
    margin-bottom: 12px;
    min-height: 100px;
  }
  
  .message-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
  }
  
  .message-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }
  
  .message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
  }
  
  .attachment {
    display: flex;
    align-items: center;
    margin-right: auto;
    color: #666;
    font-size: 13px;
  }
  
  .attachment-icon {
    margin-right: 4px;
  }
  
  .more-text {
    color: #666;
    font-size: 13px;
    margin-right: 4px;
  }
  
  .arrow-icon {
    color: #999;
    font-size: 12px;
  }
  </style> 